import API from "@/utils/request";

export function getPageMessage({pageNum,pageSize}){
    return API.get('/message/page',{
        params:{
            pageNum,
            pageSize
        }
    })
}

export function getAllMessage(){
    return API.get('/message')
}

export function getMessageById(id){
    return API.get(`/message/${id}`)
}

export function saveMessage(message){
    return API.post('/message',message)
}

export function updateMessage(message){
    return API.put('/message',message)
}

export function removeMessage(id){
    return API.delete(`/message/${id}`)
}
export function getMessageByGoodsId(id){
    return API.get(`/message/goodsId`)
}